import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import { createPinia } from 'pinia'; // 导入 createPinia

import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import './views/styles/global.css'

const app = createApp(App)
const pinia = createPinia(); // 创建 Pinia 实例

app.use(ElementPlus).use(pinia).use(router)

// 注册Element puls图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')
